//
//  UIColor+M1HEX.m
//  NewMarryU
//
//  Created by apple on 2018/7/11.
//  Copyright © 2018年 Cedar. All rights reserved.
//

#import "UIColor+M1HEX.h"

@implementation UIColor (M1HEX)
+(UIColor *)m1_colorHex:(NSUInteger)hex{
    return [UIColor m1_colorHex:hex alpha:1];
}

+(UIColor *)m1_colorHex:(NSUInteger)hex alpha:(CGFloat)alpha{
    float red = ((float)((hex & 0xFF0000) >> 16))/255.0;
    float green = ((float)((hex & 0xFF00) >> 8))/255.0;
    float blue = ((float)(hex & 0xFF))/255.0;
    return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
}
@end
